//$(document).ready(function() {
//	//预览二维码功能
////	$('.operation_btn').click(function() {
////		var codeid = this.id;
////        var template = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx631f54c7933d782f&redirect_uri=http://117.78.6.144/wcpay/socket&response_type=code&scope=snsapi_userinfo&state="+codeid+"#wechat_redirect";
////
////        var html = "<div id='qrcode'></div>";
////		$('#code').html(html);
////		$('#code').show();
////		$('#qrcode').qrcode({
////			render: "table", //table方式
////			width: 400, //宽度
////			height: 400, //高度
////			text: template
////		});
////	});
//	//点击按钮，调用浏览器打印
////	$('.print').click(function() {
////        var qrcode = new QRCode(document.getElementById("code"), {
////            width : 500,
////            height : 500
////        });
////        alert(qqq)
////		var codeid = this.name;
////        var template = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx631f54c7933d782f&redirect_uri=http://117.78.6.144/wcpay/socket&response_type=code&scope=snsapi_userinfo&state="+codeid+"#wechat_redirect";
////		var html = "<div id='qrcode'></div>";
////		$('#code').html(html+"<br><br>"+codeid);
////		$('#code').show();
////		$('#qrcode').qrcode({
////			render: "table", //table方式
////			width: 263, //宽度
////			height: 262.5, //高度
////			text: template
////		});
////        var texts="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx631f54c7933d782f&redirect_uri=http://117.78.6.144/wcpay/socket&response_type=code&scope=snsapi_userinfo&state="+codeid+"#wechat_redirect";
////        qrcode.makeCode(texts);
////        $('#code').show();
////		Print();
////	});
////    $('.print').click(function() {
////        var qr = new QRCode(document.getElementById("code"), {
////            width : 500,
////            height : 500
////        });
////        var codeid = this.name;
////        var texts="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx631f54c7933d782f&redirect_uri=http://117.78.6.144/wcpay/socket&response_type=code&scope=snsapi_userinfo&state="+codeid+"#wechat_redirect";
////        qr.makeCode(texts);
////        //Print();
////    });
////	function Print() {
////		bdhtml = window.document.body.innerHTML;
////		sprnstr = "<!--startprint-->";
////		eprnstr = "<!--endprint-->";
////		prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
////		prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
////		window.document.body.innerHTML = prnhtml;
////		window.print();
////		window.location.reload();
////	}
//})
//
//var sons = document.getElementsByName("son");
////反选框
//function fanxuan() {
//	for (var i = 0; i < sons.length; i++) {
//		if (sons[i].checked) {
//			sons[i].checked = "";
//		} else {
//			sons[i].checked = "checked";
//		}
//	}
//}
////全选框
//function changeAll() {
//	var s = document.getElementsByName("son");
//	for (var i = 0; i < s.length; i++) {
//		s[i].checked = "checked";
//	}
//}
//
//// function change() {
//// 	var isTrue = true;
//// 	for (var i = 0; i < sons.length; i++) {
//// 		isTrue = (isTrue && sons[i].checked);
//// 	}
//// }
////多选全选打印
//function Allprint(){
//    var checks=[];
//    for (var i = 0; i < sons.length; i++) {
//        if (sons[i].checked) {
//            var codeid = sons[i].value;
//            var template = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx631f54c7933d782f&redirect_uri=http://117.78.6.144/wcpay/socket&response_type=code&scope=snsapi_userinfo&state="+codeid+"#wechat_redirect";
//
//            var html = "<p id='qrcode'></p>";
//            $('#Allcode').append("<p style='margin-bottom:9%'>"+html+"</p>"+codeid+"<br/><br/>");
//
//            $('#Allcode').qrcode({
//                render: "table", //table方式
//                width: 400, //宽度
//                height: 400, //高度
//                text: template
//            });
//            $('#Allcode').show();
//        }else{
//            checks.push(i);
//            if(checks.length==sons.length){
//                return false;
//            }
//        }
//    }
//    APrint();
//}
//function APrint() {
//    bdhtml = window.document.body.innerHTML;
//    sprnstr = "<!--++++++++++-->";
//    eprnstr = "<!--========-->";
//    prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
//    prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
//    window.document.body.innerHTML = prnhtml;
//    alert(prnhtml)
//    window.print();
//    window.location.reload();
//}
//
////	function state(obj){
////		var sim=obj.name;
////		$.get("/box_management/code",{sim:sim});
////	}